{% extends "../base.html" %}

{% block title %} {% end %}
{% block css %}

{% end %}
{% block body %}

{% include ../common/header.html %}

<div class="layui-container fly-marginTop fly-user-main">
    {% include left_nav.html %}
    <div class="fly-panel fly-panel-user" pad20>
        <div class="layui-tab layui-tab-brief" lay-filter="user">
            <ul class="layui-tab-title">
                <li class="layui-this">
                   二维码分享
                </li>
                <li>
                    我的好友
                </li>
            </ul>
            <div class="layui-tab-content">
                <div class="layui-tab-item layui-show">
                    <div class="layui-col-md10">
                        <input id="reg_uri" class="layui-input" value="{{ reg_uri }}">
                    </div>
                    <div class="layui-col-md2">
                        <button class="clipboard_btn layui-btn"data-clipboard-target="#reg_uri">
                            复制
                        </button>
                    </div>

                    <img width="50%" src="{{ qrcode_img }}"/>
                </div>
                <div class="layui-tab-item">
                    <table class="layui-table">
                        <colgroup>
                            <col width="150">
                            <col width="150">
                            <col width="200">
                            <col>
                        </colgroup>
                        <thead>
                            <tr>
                                <th>名称</th>
                                <th>性别</th>
                                <th>注册时间</th>
                                <th>格言</th>
                            </tr>
                        </thead>
                        <tbody>
                            {% for item in member_li %}
                            <tr>
                                <td>{{ item.username }}</td>
                                <td>{{ item.sex_option }}</td>
                                <td>{{ str(item.created_at).split('.')[0] }}</td>
                                <td>{{ item.sign }}</td>
                            </tr>
                            {% end %}
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>

</div>

{% include ../common/footer.html %}

{% end %}
{% block javascript %}
<script src="{{ static_url('js/clipboard.min.js') }}" charset="utf-8"></script>

<script type="text/javascript">
var clipboard = new ClipboardJS('.clipboard_btn');
clipboard.on('success', function(e) {
    // console.log(e);
});
clipboard.on('error', function(e) {
    console.log(e);
});
layui.use(['form'], function() {
    var $ = layui.jquery, form = layui.form

})

</script>
{% end %}
